export const getObjValueByField = (obj: any, field: string) => {
  if (obj && field) {
    const fieldArr = field.split('.')
    let value = obj
    for (let i = 0; i < fieldArr.length; i++) {
      if (value) {
        value = value[fieldArr[i]]
      }
    }
    return value
  }
  return ''
}